<?php
/**
 * 商品中心
 * User:LLW
 * Date:2020-03-26
 */

namespace app\api\controller;

use app\api\model\GoodsModel;
use think\Request;

class Goods extends BaseController
{
    public function __construct(Request $request = null)
    {
        parent::__construct();
        $this->goods = new GoodsModel();
    }

    /**
     * 商品列表
     * @return object
     */
    public function index()
    {
        $list = $this->goods->getList();
        return $list;
    }

    /**
     * 商品分类
     * @return object
     */
    public function GoodsClass()
    {
        $list = $this->goods->getClass();
        return $list;
    }

    /**
     * 商品详情
     * @return object
     */
    public function OrderFind()
    {
        $find = $this->goods->getFind();
        return $find;
    }

    /**
     * 商品评价
     * @return object
     */
    public function GoodsComments()
    {
        $list = $this->goods->getComments();
        return $list;
    }
}